class Room {
  int? id;
  String roomName;
  String viewPoint;
  String roomAvatar;

  Room({
    this.id,
    required this.roomName,
    required this.viewPoint,
    required this.roomAvatar,
  });

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'roomName': roomName,
      'viewPoint': viewPoint,
      'roomAvatar': roomAvatar,
    };
  }

  factory Room.fromMap(Map<String, dynamic> map) {
    return Room(
      id: map['id'],
      roomName: map['roomName'],
      viewPoint: map['viewPoint'],
      roomAvatar: map['roomAvatar'],
    );
  }

  Room copyWith({
    int? id,
    String? roomName,
    String? viewPoint,
    String? roomAvatar,
  }) {
    return Room(
      id: id ?? this.id,
      roomName: roomName ?? this.roomName,
      viewPoint: viewPoint ?? this.viewPoint,
      roomAvatar: roomAvatar ?? this.roomAvatar,
    );
  }
} 